import request from '@/utils/request'

// 查询设备数据列表
export function listDeviceData(query) {
  return request({
    url: '/iot/device/data/list',
    method: 'get',
    params: query
  })
}

// 查询设备数据详细
export function getDeviceData(dataId) {
  return request({
    url: '/iot/device/data/' + dataId,
    method: 'get'
  })
}

// 新增设备数据
export function addDeviceData(data) {
  return request({
    url: '/iot/device/data/add',
    method: 'post',
    data: data
  })
}

// 修改设备数据
export function updateDeviceData(data) {
  return request({
    url: '/iot/device/data/edit',
    method: 'put',
    data: data
  })
}

// 删除设备数据
export function delDeviceData(dataId) {
  return request({
    url: '/iot/device/data/' + dataId,
    method: 'delete'
  })
}

// 导出设备数据
export function exportDeviceData(query) {
  return request({
    url: '/iot/device/data/export',
    method: 'post',
    params: query
  })
}